package com.sinog.front.util;

import com.sinog.core.model.UserDTO;
import java.util.HashMap;
import java.util.Map;

/**
 * @desc 对象转换封装工具类
 * @author lzq
 * @date -
 */
public final class ObjectConvertUtil {

    /**
     * user对象转换成map
     * @param loginUser loginUser
     * @return Map<String,String>
     */
    public static Map<String,String> userToMap(UserDTO loginUser) {
        Map<String,String> loginUserParam = new HashMap<>(16);
        loginUserParam.put("departId",loginUser.getDepartid());
        loginUserParam.put("departName",loginUser.getDepartName());
        loginUserParam.put("orgId",loginUser.getOrgid());
        loginUserParam.put("orgName",loginUser.getOrgName());
        loginUserParam.put("level",loginUser.getLevel());
        loginUserParam.put("loginUser",loginUser.getAccount());
        return loginUserParam;
    }
}